package com.black.app.domain.resp.store;

import com.black.app.domain.store.AppStoreCategory;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
@ApiModel(value = "AppStoreCategoryResp", description = "商品分类信息响应对象")
public class AppStoreCategoryResp {

    @ApiModelProperty(value = "分类ID")
    private Integer categoryId;

    @ApiModelProperty(value = "分类名称")
    private String categoryName;

    @ApiModelProperty(value = "分类图片")
    private String categoryImageSrc;

    @ApiModelProperty(value = "父级分类ID")
    private Integer superId;

    @ApiModelProperty(value = "子分类")
    private List<AppStoreCategoryResp> children;

    public AppStoreCategoryResp() {

    }

    // 构造器
    public AppStoreCategoryResp(AppStoreCategory category) {
        this.categoryId = category.getCategoryId();
        this.superId = category.getSuperId();
        this.categoryName = category.getCategoryName();
        this.categoryImageSrc = category.getCategoryImageSrc();
    }


    public Integer getId() {
        return superId;
    }
}
